package com.bcu.cn.onlineexamsystem.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

@Data  // 使用 Lombok 简化 getter/setter
@TableName("users")  // 明确指定数据库表名

import lombok.Data;

@Data

public class User {
    @TableId  // 标记主键字段（假设 userId 是主键）
    private String userId;
    private String userName;
    private String password;
    private String role; // student/teacher/admin
    private String email;
    private String phone;
    private String realName;
    private Integer classId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    private String role; // student/teacher/admin    
    private String email; // 新增邮箱字段
    private String phone;
    private String realName;
    private Integer classId;  // 修改为Integer类型，允许null值

}